<ul class="nav navbar-nav">
    <li class="dropdown">
        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
           aria-expanded="false">项目{% if request.tartec.project.id %}
            ({{ request.tartec.project.project_title }})
        {% endif %} <span class="caret"></span></a>
        <ul class="dropdown-menu">
            {% if my %}
                <li><i class="fa fa-list" aria-hidden="true"></i> 我创建的项目</li>
                {% for project in my %}
                    <li><a href="{% url 'dashboard' project_id=project.id %}">{{ project.project_title }}</a></li>
                {% endfor %}
                <li role="separator" class="divider"></li>
            {% endif %}
            {% if join %}
                <li><i class="fa fa-handshake-o" aria-hidden="true"></i> 我参与的项目</li>
                {% for project in join %}
                    <li><a href="{% url 'dashboard' project_id=project.id %}">{{ project.project.project_title }}</a>
                    </li>
                {% endfor %}
                <li role="separator" class="divider"></li>
            {% endif %}
            <li><a href="{% url 'project_list' %}">所有项目</a></li>
        </ul>
    </li>
</ul>